import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class VideoHome{
  List<VideoInfo> videoHots;

  VideoHome({ this.videoHots});

  VideoHome.fromJson(Map<String, dynamic> json) {
    if (json['videoHots'] != null) {
      videoHots = new List<VideoInfo>();
      json['videoHots'].forEach((v) {
        videoHots.add(new VideoInfo.fromJson(v));
      });
    }
  }
}
class VideoInfo {
  String videoUrl;
  String language;
  String title;
  String className;
  int hidden;
  int status;
  int createTime;
  int finished;
  int likeCount;
  String intro;
  String category;
  String cover;
  String latestSerialsUrl;
  String routerMsg;
  int routerStatus;
  String timeLong;
  int id;
  String date;
  String latestSerials;
  int hateCount;
  int siteId;
  String director;
  String area;
  int serialsCount;
  int updateTime;
  String author;

  VideoInfo(
      {this.videoUrl,
        this.language,
        this.title,
        this.className,
        this.hidden,
        this.status,
        this.createTime,
        this.finished,
        this.likeCount,
        this.intro,
        this.category,
        this.cover,
        this.latestSerialsUrl,
        this.routerMsg,
        this.routerStatus,
        this.timeLong,
        this.id,
        this.date,
        this.latestSerials,
        this.hateCount,
        this.siteId,
        this.director,
        this.area,
        this.serialsCount,
        this.updateTime,
        this.author});

  VideoInfo.fromJson(Map<String, dynamic> json) {
    videoUrl = json['video_url'];
    language = json['language'];
    title = json['title'];
    className = json['class_name'];
    hidden = json['hidden'];
    status = json['status'];
    createTime = json['create_time'];
    finished = json['finished'];
    likeCount = json['like_count'];
    intro = json['intro'];
    category = json['category'];
    cover = json['cover'];
    latestSerialsUrl = json['latest_serials_url'];
    routerMsg = json['router_msg'];
    routerStatus = json['router_status'];
    timeLong = json['time_long'];
    id = json['id'];
    date = json['date'];
    latestSerials = json['latest_serials'];
    hateCount = json['hate_count'];
    siteId = json['site_id'];
    director = json['director'];
    area = json['area'];
    serialsCount = json['serials_count'];
    updateTime = json['update_time'];
    author = json['author'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['video_url'] = this.videoUrl;
    data['language'] = this.language;
    data['title'] = this.title;
    data['class_name'] = this.className;
    data['hidden'] = this.hidden;
    data['status'] = this.status;
    data['create_time'] = this.createTime;
    data['finished'] = this.finished;
    data['like_count'] = this.likeCount;
    data['intro'] = this.intro;
    data['category'] = this.category;
    data['cover'] = this.cover;
    data['latest_serials_url'] = this.latestSerialsUrl;
    data['router_msg'] = this.routerMsg;
    data['router_status'] = this.routerStatus;
    data['time_long'] = this.timeLong;
    data['id'] = this.id;
    data['date'] = this.date;
    data['latest_serials'] = this.latestSerials;
    data['hate_count'] = this.hateCount;
    data['site_id'] = this.siteId;
    data['director'] = this.director;
    data['area'] = this.area;
    data['serials_count'] = this.serialsCount;
    data['update_time'] = this.updateTime;
    data['author'] = this.author;
    return data;
  }
}